// 引入Vue
import Vue from "vue";
// 引入VueRouter
import VueRouter from "vue-router";
// 引入行业动态组件
import Industry from "@/pages/ContentSwitchIndustry";
// 引入媒体水院组件
import Media from "@/pages/ContentSwitchMedia";
// 引入更多详情组件
import Moretext from "@/pages/MoreText";
// 引入学院概况组件
import Introduction from "@/pages/Introduction";
// 引入组织机构组件
import Organization from "@/pages/Organization";
// 引入教学科研组件
import Teaching from "@/pages/Teaching";
// 引入公共服务组件
import Public from "@/pages/Public";
// 引入信息公开组件
import Information from "@/pages/Information";
// 应用VueRouter
Vue.use(VueRouter);
// 创建VueRouter
const router = new VueRouter({
  //路由模式
  mode: "hash",
  // 路由管理
  routes: [
    { path: "/", redirect: "/media" },
    { name: "industry", path: "/industry", components: { Industry } },
    { name: "media", path: "/media", component: Media },
    { name: "more-text", path: "/more-text", components: { Moretext } },
    {
      name: "introduction",
      path: "/introduction",
      components: { Introduction },
    },
    {
      name: "organization",
      path: "/organization",
      components: { Organization },
    },
    { name: "teaching", path: "/teaching", components: { Teaching } },
    { name: "public", path: "/public", components: { Public } },
    { name: "information", path: "/information", components: { Information } },
  ],
});
// 暴露路由
export default router;
